This is the Python SDK documentation. The SDK has been completely refactored to provide a modular, Backend-as-a-Service architecture for enterprise AI agent development.
Core Architecture
The SDK is built around five main modules:Backend
Agents Backend - Get framework specific arguments for AI agents.
Agents
Agent Management - Create, configure, and manage AI agents with tools, knowledge bases, and execution capabilities.
Tasks
Task Execution - Handle complex task workflows, execution management, and real-time streaming.
Tools Repository
Tools Integration - Register local tools, manage external integrations, and handle MCP servers.
Knowledge Bases
Knowledge Management - Create and search knowledge repositories with semantic search capabilities.
Events
Event Handling - Event-driven programming with decorators, real-time streaming, and background processing.
Installation
Key Features
- 🤖 Agent Management: Create, configure, and manage AI agents with comprehensive lifecycle control
- ⚡ Task Execution: Handle complex multi-step workflows with real-time event streaming
- 🔧 Tools Integration: Register local tools and integrate with external services via MCP
- 📚 Knowledge Bases: Semantic search across document repositories with AI-powered insights
- 🎯 Event-Driven: Event handling with decorators for responsive agent applications
- 🔄 Async/Sync Support: Both asynchronous and synchronous interfaces for flexibility
- 📊 Real-time Monitoring: Track agent performance, metrics, and execution in real-time
- 🏗️ Modular Architecture: Five independent modules that work seamlessly together
Quick Start Example
Asynchronous Usage
Synchronous Usage
Event-Driven Development
The SDK supports event-driven programming with decorators for task handling and lifecycle management:Asynchronous Usage
Synchronous Usage
Lifecycle Management
Module Documentation
Agents Module
Agent creation, management, and execution with tools and knowledge bases
Tasks Module
Task lifecycle management, execution control, and real-time streaming
Tools Repository
Local tool registration, external integrations, and MCP server management
Knowledge Bases
Document management and semantic search across knowledge repositories
Events Module
Event-driven programming, decorators, and background task processing
Configuration
SDK configuration, authentication, and environment setup
Types
Data types, enumerations, and models used across the SDK